package com.xyzwps.website.modules.user.payload;

import com.xyzwps.lib.express.router.annotation.openapi.SchemaComponent;
import com.xyzwps.website.common.Regexp;
import io.avaje.validation.constraints.NotEmpty;
import io.avaje.validation.constraints.Pattern;
import io.avaje.validation.constraints.Valid;

@Valid
@SchemaComponent
public class SimpleRegisterPayload {
    @NotEmpty(message = "phone is required")
    @Pattern(regexp = Regexp.PHONE, message = "phone is invalid")
    private String phone;

    @NotEmpty(message = "vcode is required")
    @Pattern(regexp = Regexp.VCODE, message = "vcode is invalid")
    private String vcode;

    // region getter/setter

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getVcode() {
        return vcode;
    }

    public void setVcode(String vcode) {
        this.vcode = vcode;
    }

    // endregion
}
